package com.study.service.impl;

import java.util.List;

import com.study.bean.ImgBean;
import com.study.bean.PictureBean;
import com.study.bean.courseBean;
import com.study.bean.scBean;
import com.study.dao.AddCarItemDao;
import com.study.service1.IAddCarItemService;
import com.study.tools.MyTools;

public class AddCarItemService implements IAddCarItemService {

	/**
	 * @param利用課程名和課程的價格查詢
	 * @return
	 */
	public List<courseBean> getcouserInfo(courseBean pcou) {
		List<courseBean> list = MyTools.getInstance(AddCarItemDao.class).getInfo(pcou);
		return list;
	}

	/**
	 * @param pcou 利用用戶id和課程id進行插入操作
	 * @return
	 */
	public int getcouserInfosc(scBean pcou) {
		int i = MyTools.getInstance(AddCarItemDao.class).getInfosc(pcou);
		return i;
	}

	/**
	 * @param利用童虎id和课程id进行查询操作
	 * @return
	 */
	public List<PictureBean> getscInfo(PictureBean pcou) {
		List<PictureBean> list = MyTools.getInstance(AddCarItemDao.class).getpictureInfo(pcou);
		return list;
	}

	/**
	 * @param 利用c_id进行图片查询操作
	 * @return
	 */
	public List<ImgBean> getimgoneInfo(ImgBean pcou) {
		List<ImgBean> list = MyTools.getInstance(AddCarItemDao.class).getimgInfo(pcou);
		return list;
	}

	/**
	 * @param 购物车删除操作：删除sc表的一行
	 * @return
	 */
	public int getdeleteInfo(ImgBean pcou) {
		int list = MyTools.getInstance(AddCarItemDao.class).getdeleteInfoto(pcou);
		return list;
	}
	/**
	 * @param 更改tag为1
	 * @return
	 */
	public int 	getdeleteInfogengxin(scBean pcou) {
		int list = MyTools.getInstance(AddCarItemDao.class).getdeleteInfotogengxin(pcou);
		return list;
	}
	
	/**
	 * @param 查询订单
	 * @return
	 */
	public  List<PictureBean> 	getscInfoafford(PictureBean pcou) {
		 List<PictureBean> list = MyTools.getInstance(AddCarItemDao.class).getdeleteInfotoafford(pcou);
		return list;
	}
	
}
